package 面向对象_特征3;

public class 面向对象_1_继承3_实例2 extends 面向对象_1_继承3_实例1 {


    int year;
    void printYear(){
        System.out.println(this.year);
    }


    public static void main(String[] args) {
        面向对象_1_继承3_实例2 dx  = new 面向对象_1_继承3_实例2();
        dx.sex =1;
        dx.salary = 1;
        dx.year = 1;


        dx.if_sex();
        dx.if_salary();
        dx.printYear();
    }

}
